<template>
  <div>{{ a }}</div>
  <div>{{ b }}</div>
  <button @click="a++">a++</button>
  <button @click="b++">b++</button>
  <div>total:{{ total }}</div>
</template>

<script setup>
import { computed, ref } from 'vue'

const a = ref(1)
const b = ref(2)
const total = computed(() => {
  return a.value + b.value
})
</script>

<style lang="scss" scoped></style>
